package com.xuzhiguang.baidu.pan.sdk.common.http;


import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author xuzhiguang
 * @date 2020/6/25 17:08
 */
public class Request {

    protected String url;

    protected HttpMethod httpMethod = HttpMethod.GET;

    protected Map<String, String> parameters = new LinkedHashMap<>();

    protected Map<String, String> headers = new LinkedHashMap<>();

    protected byte[] content;

    protected long contentLength;

    @Override
    public String toString() {
        return "Request{" +
                "url='" + url + '\'' +
                ", httpMethod=" + httpMethod +
                ", parameters=" + parameters +
                ", headers=" + headers +
                ", content=" + Arrays.toString(content) +
                ", contentLength=" + contentLength +
                '}';
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public HttpMethod getHttpMethod() {
        return httpMethod;
    }

    public void setHttpMethod(HttpMethod httpMethod) {
        this.httpMethod = httpMethod;
    }

    public Map<String, String> getParameters() {
        return parameters;
    }

    public void setParameters(Map<String, String> parameters) {
        this.parameters = parameters;
    }

    public Map<String, String> getHeaders() {
        return headers;
    }

    public void setHeaders(Map<String, String> headers) {
        this.headers = headers;
    }

    public byte[] getContent() {
        return content;
    }

    public void setContent(byte[] content) {
        this.content = content;
    }

    public long getContentLength() {
        return contentLength;
    }

    public void setContentLength(long contentLength) {
        this.contentLength = contentLength;
    }
}
